import 'dart:ui';

import 'package:flame/game.dart';
import 'package:flame/parallax.dart';

class NoFCSParallaxGame extends Game {
  late Parallax parallax;

  @override
  Future<void> onLoad() async {
    parallax = await loadParallax(
      [
        'parallax/bg.png',
        'parallax/mountain-far.png',
        'parallax/mountains.png',
        'parallax/trees.png',
        'parallax/foreground-trees.png',
      ],
      size: size,
      baseVelocity: Vector2(20, 0),
      velocityMultiplierDelta: Vector2(1.8, 1.0),
    );
  }

  @override
  void update(double dt) {
    parallax.update(dt);
  }

  @override
  void render(Canvas canvas) {
    parallax.render(canvas);
  }
}
